#include "err_show.h"
#include <Windows.h>
void ErrShow(DWORD dwError)
{
	HLOCAL hLocal = NULL;
	DWORD systemLocale = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL);

	BOOL fOk = FormatMessage(
		FORMAT_MESSAGE_FROM_SYSTEM |
		FORMAT_MESSAGE_IGNORE_INSERTS |
		FORMAT_MESSAGE_ALLOCATE_BUFFER,
		NULL,
		dwError,
		systemLocale,
		(PTSTR)&hLocal,
		0,
		NULL);
	if (!fOk)
	{

	}
	if (fOk && (hLocal != NULL))
	{
		MessageBox(NULL, (PCTSTR)LocalLock(hLocal), L"MSG",0);
		LocalFree(hLocal);
	}
}